﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DTC.Pages;

namespace DrugsPackage
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            op = new OpenedPages();
            op.MRLP = new MedRecordsListPage();
            DisplayArea.Content = op.MRLP;
            MedRecListButton.IsChecked = true;
        }
        private void MedRecListButton_Click(object sender, RoutedEventArgs e)
        {
            if (op.MRLP == null)
                op.MRLP = new MedRecordsListPage();
            DisplayArea.Content = op.MRLP;
        }

        private void DrugManagementButton_Click(object sender, RoutedEventArgs e)
        {
            if (op.DMP == null)
            {
                op.DMP = new DrugManagementPage();
            }
            DisplayArea.Content = op.DMP;
        }
        private OpenedPages op;
        private struct OpenedPages
        {
            public DrugManagementPage DMP;
            public MedRecordsListPage MRLP;
            public JournalPage JP;
        }
    }
}
